home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Taifun
/
Taifun 054 (1988-05-15)(Ossowski, Stefan)(DE)(PD).zip
/
Taifun 054 (1988-05-15)(Ossowski, Stefan)(DE)(PD).adf
/
MRBackup
/
MRBackup2.0
/
MiscRequest.c
< prev
next >
Wrap
C/C++ Source or Header
|
1988-04-09
|
2KB
|
67 lines
/* Miscellaneous requester support routines. */
#include <exec/memory.h>
#include <intuition/intuition.h>
#include <intuition/intuitionbase.h>
#include <libraries/dosextens.h>
#include <graphics/text.h>
#include <functions.h>
#include <ctype.h>
struct IntuiText diskreq_body_text = {
AUTOFRONTPEN, /* FrontPen */
AUTOBACKPEN, /* BackPen */
AUTODRAWMODE, /* DrawMode */
AUTOLEFTEDGE, /* LeftEdge */
AUTOTOPEDGE, /* TopEdge */
NULL, /* ITextFont Pointer */
(UBYTE *)"", /* IText */
NULL /* NextText */
};
struct IntuiText diskreq_pos_text = {
AUTOFRONTPEN, /* FrontPen */
AUTOBACKPEN, /* BackPen */
AUTODRAWMODE, /* DrawMode */
AUTOLEFTEDGE, /* LeftEdge */
AUTOTOPEDGE, /* TopEdge */
NULL, /* ITextFont Pointer */
(UBYTE *)"OK", /* IText */
NULL /* NextText */
};
struct IntuiText diskreq_neg_text = {
AUTOFRONTPEN, /* FrontPen */
AUTOBACKPEN, /* BackPen */
AUTODRAWMODE, /* DrawMode */
AUTOLEFTEDGE, /* LeftEdge */
AUTOTOPEDGE, /* TopEdge */
NULL, /* ITextFont Pointer */
(UBYTE *)"Cancel", /* IText */
NULL /* NextText */
};
/* Generate an autorequest for the insertion of a floppy disk.
* Called with:
* window: pointer to window for request
* drivespec: the disk drive name
*/
int
RequestDisk(window, drivespec, msg)
struct Window *window; char *drivespec, *msg;
{
UBYTE prompt[71];
ULONG width;
strncpy(prompt, msg, sizeof(prompt)-strlen(drivespec)-2);
strncat(prompt,drivespec,(sizeof(prompt)-strlen(prompt)-2));
width = 8 * strlen(prompt) + 48;
diskreq_body_text.IText = prompt;
return AutoRequest(
window, &diskreq_body_text, &diskreq_pos_text,
&diskreq_neg_text, NULL, NULL, width, 50L);
}